<template>
	<div id="app">
		<router-view/>
		<loading v-if="showLoading"></loading>
	</div>
</template>

<style>
	@import "assets/app.less";
</style>
<script>
  import {mapState} from 'vuex'
  import {getTenantConfig} from '@/api/site'
  import loading from '@/components/common/loading.vue';

  export default {
    name: 'App',
    components: {loading},
    computed: {
      ...mapState({
        showLoading: state => state.showLoading
      })
    },
    created() {
      let vm = this;
      getTenantConfig().then(rep => {
				vm.$store.commit('setConfig',rep.data.data);
      })
    }
  }
</script>
